<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>GridDB Quick Start Guide</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="title" content="GridDB Quick Start Guide"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2019-01-16T13:32+0900"/>
<meta name="author" content=""/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>

<meta http-equiv="X-UA-Compatible" content="IE=8">
<STYLE type="text/css">
html { font-family: Verdana, Meiryo, sans-serif; font-size: 10pt; }
h2 { border-left: 7px solid #00C; padding: 0 0 0 7px; }
h3 { border-left: 5px solid #00A; padding: 0 0 0 5px; }
h4 { border-left: 3px solid #008; padding: 0 0 0 3px; }
pre {
font-family: courier, monospace;
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
width:auto;
overflow-x:auto;
overflow-y:hidden;
}
code {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #cacaea;
background-color: #f0f0ff;
border-radius: 3px;
}
a { text-decoration: none; color: #2233AA; }
a:visited { text-decoration: none; color: #2233AA; }
a:hover { text-decoration: underline; color: #2288FF; }
table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
margin-bottom: 6px;
}
th, tr, td {
vertical-align: top;
padding: 5px;
border-collapse: collapse;
}
tr > td:first-child {
white-space: nowrap;
}
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
#table-of-contents {
width: 23%;
height: 100%;
top: 0px;
left: 0px;
font-size: 70%;
position: fixed;
overflow: auto;
}
#table-of-contents ul {
margin: 1pt 0 1pt 1.5em;
padding: 0;
list-style-type: none;
}
#table-of-contents li {
margin: 1pt 0;
}
#content {
width: 76%;
float: right;
}
#postamble {
display: none;
}
.revision {
text-align: right;
font-size: 8pt;
}
@media print {
#table-of-contents {
width:100%;
font-size: 100%;
position: static;
overflow: visible;
}
#content {
padding: 0px;
width:100%;
float: none;
}
}
</STYLE>


</head>
<body>

<div id="preamble">

</div>

<div id="content">
<h1 class="title">GridDB Quick Start Guide</h1>








<p class="revision">Revision: CE-20190116</p>

<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Introduction</a>
<ul>
<li><a href="#sec-1-1">1.1 The Purpose and Structure of This Document</a></li>
<li><a href="#sec-1-2">1.2 What is GridDB</a>
<ul>
<li><a href="#sec-1-2-1">1.2.1 Overview</a></li>
<li><a href="#sec-1-2-2">1.2.2 Features</a></li>
</ul>
</li>
<li><a href="#sec-1-3">1.3 Description of Terms</a></li>
</ul>
</li>
<li><a href="#sec-2">2 System Design and Configuration</a>
<ul>
<li><a href="#sec-2-1">2.1 Make sure that required resources are available.</a>
<ul>
<li><a href="#sec-2-1-1">2.1.1 Total Memory Usage</a></li>
<li><a href="#sec-2-1-2">2.1.2 Number of Nodes Constituting a Cluster</a></li>
<li><a href="#sec-2-1-3">2.1.3 Disk Usage</a></li>
</ul>
</li>
<li><a href="#sec-2-2">2.2 Install and set up GridDB.(Node)</a>
<ul>
<li><a href="#sec-2-2-1">2.2.1 Confirming the Environment</a></li>
<li><a href="#sec-2-2-2">2.2.2 Installing a Node</a></li>
<li><a href="#sec-2-2-3">2.2.3 Confirmation After Installation</a></li>
<li><a href="#sec-2-2-4">2.2.4 Setting up an administrator user (Mandatory)</a></li>
</ul>
</li>
<li><a href="#sec-2-3">2.3 Configure environment-dependent parameters.</a>
<ul>
<li><a href="#sec-2-3-1">2.3.1 Configuration of the Network Environment (Mandatory)</a></li>
<li><a href="#sec-2-3-2">2.3.2 Setting the cluster name (mandatory)</a></li>
</ul>
</li>
<li><a href="#sec-2-4">2.4 configure tuning parameters.</a>
<ul>
<li><a href="#sec-2-4-1">2.4.1 Configuring Tuning Parameters</a></li>
<li><a href="#sec-2-4-2">2.4.2 Parameters Related to Performance and Availability</a></li>
<li><a href="#sec-2-4-3">2.4.3 Other Parameters</a></li>
</ul>
</li>
<li><a href="#sec-2-5">2.5 Distribute the definition file to each node</a></li>
<li><a href="#sec-2-6">2.6 Installing and Setting Up GridDB (Client)</a>
<ul>
<li><a href="#sec-2-6-1">2.6.1 Confirming the Environment</a></li>
<li><a href="#sec-2-6-2">2.6.2 Installing a client library</a></li>
<li><a href="#sec-2-6-3">2.6.3 Confirmation After Installation</a></li>
<li><a href="#sec-2-6-4">2.6.4 Setting Up Libraries</a></li>
<li><a href="#sec-2-6-5">2.6.5 Setting Up a Client</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-3">3 Operations</a>
<ul>
<li><a href="#sec-3-1">3.1 Operations from Starting to Stopping</a>
<ul>
<li><a href="#sec-3-1-1">3.1.1 Basic Flow</a></li>
<li><a href="#sec-3-1-2">3.1.2 Starting Each Node</a></li>
<li><a href="#sec-3-1-3">3.1.3 Configuring a Cluster</a></li>
<li><a href="#sec-3-1-4">3.1.4 Using a Service</a></li>
<li><a href="#sec-3-1-5">3.1.5 Stopping a Cluster</a></li>
<li><a href="#sec-3-1-6">3.1.6 Restarting a Stopped Cluster</a></li>
</ul>
</li>
<li><a href="#sec-3-2">3.2 Obtaining Various Information</a>
<ul>
<li><a href="#sec-3-2-1">3.2.1 Obtaining Cluster Information</a></li>
</ul>
</li>
<li><a href="#sec-3-3">3.3 Adding/detaching nodes in a cluster</a>
<ul>
<li><a href="#sec-3-3-1">3.3.1 Adding a node to a cluster in operation</a></li>
<li><a href="#sec-3-3-2">3.3.2 Detaching a node from a cluster in operation (shrinking a cluster)</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-4">4 Notice</a></li>
<li><a href="#sec-5">5 Annex</a>
<ul>
<li><a href="#sec-5-1">5.1 Parameter List</a>
<ul>
<li><a href="#sec-5-1-1">5.1.1 Node definition file(gs_node.json)</a></li>
<li><a href="#sec-5-1-2">5.1.2 Cluster definition file(gs_cluster.json)</a></li>
</ul>
</li>
<li><a href="#sec-5-2">5.2 Build/execution method</a></li>
</ul>
</li>
<li><a href="#sec-6">6 Trademark</a></li>
</ul>
</div>
</div>





<DIV class="break"></DIV><BR>


<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Introduction</h2>
<div class="outline-text-2" id="text-1">



</div>

<div id="outline-container-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> The Purpose and Structure of This Document</h3>
<div class="outline-text-3" id="text-1-1">


<p>
<span style="text-decoration:underline;">This document describes basic operational procedures for GridDB(TM).</span>
</p>
<p>
This is intended for engineers working on system development using GridDB and administrators in charge of operations and maintenance of GridDB.
</p>
<p>
This document contains the following:
</p>
<ul>
<li><a href="#chap_system">System design and configuration</a>
<ul>
<li>Covers how to install and set up GridDB to make a basic environment.

</li>
</ul>

</li>
<li><a href="#chap_operation">Operations</a>
<ul>
<li>Covers basic operations, such as starting and stopping GridDB, management operations while running GridDB, and essential actions to be taken in the event of a failure.
</li>
</ul>

</li>
</ul>



</div>

</div>

<div id="outline-container-1-2" class="outline-3">
<h3 id="sec-1-2"><span class="section-number-3">1.2</span> What is GridDB</h3>
<div class="outline-text-3" id="text-1-2">



</div>

<div id="outline-container-1-2-1" class="outline-4">
<h4 id="sec-1-2-1"><span class="section-number-4">1.2.1</span> Overview</h4>
<div class="outline-text-4" id="text-1-2-1">


<p>
GridDB is a distributed NoSQL database which manages a set of data (called Row), each consisting of a key and multiple values.
</p>

<ul>
<li>GridDB performs in-memory data management, allowing high-speed processing.
<ul>
<li>Provides fast update and search capabilities, by storing a set of Rows in memory.

</li>
</ul>

</li>
<li>GridDB can be scaled out to enlarge storage capacity, in spite of performing in-memory processing.
<ul>
<li>Storage capacity can be enlarged by distributively storing data in multiple machines.  Additionally, data management can be combined with disk storage, which is not covered by this document.Accordingly, even in a single node, storage capacity can be enlarged irrespective of its memory size.

</li>
</ul>

</li>
<li>GridDB provides high availability.
<ul>
<li>Can continue processing by using replicate data if a failure occurs in any node in a cluster storing replicate data.  Additionally, each node stores persistent data update information in its disk and can restore previous data in the event of a failure.

</li>
</ul>

</li>
<li>GridDB can be scaled out up to about 1,000 nodes.
<ul>
<li>Provides high scalability by improving parallelism in a cluster, where each node performs per-Container transactions only.

</li>
</ul>

</li>
<li>GridDB requires no manual operations for managing a cluster.
<ul>
<li>GridDB performs autonomous control of its cluster, where nodes communicate with one another using the distribution protocol.

</li>
</ul>

</li>
<li>GridDB supports time-series data used by the social infrastructure.
</li>
</ul>





</div>

</div>

<div id="outline-container-1-2-2" class="outline-4">
<h4 id="sec-1-2-2"><span class="section-number-4">1.2.2</span> Features</h4>
<div class="outline-text-4" id="text-1-2-2">



<p>
Below, you can see the overview of the features of GridDB(commnunity edition).
</p>

<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Requirements</th><th scope="col" class="left">Description</th></tr>
</thead>
<tbody>
<tr><td class="left"><b>[Basic requirements]</b></td><td class="left"></td></tr>
</tbody>
<tbody>
<tr><td class="left">Large capacity (in the order of petabytes)</td><td class="left">Data storage utilizing the characteristics of in-memory storage and SSD in order to achieve both high-speed performance and large capacity.</td></tr>
<tr><td class="left">High-speed (in-memory) performance</td><td class="left">In-memory processing</td></tr>
<tr><td class="left">High scalability</td><td class="left">Scalable up to more than 1,000 servers.</td></tr>
<tr><td class="left">High availability</td><td class="left">Availability can be improved by storing replicate data in multiple servers and using HDD in combination.</td></tr>
<tr><td class="left">High autonomy</td><td class="left">Autonomous control on replicating data and balancing data layout.</td></tr>
</tbody>
<tbody>
<tr><td class="left"><b>[Requirements for social infrastructure]</b></td><td class="left"></td></tr>
</tbody>
<tbody>
<tr><td class="left">Time-series data</td><td class="left">Provision of specialized timeseries containers</td></tr>
<tr><td class="left">Guaranteed consistency</td><td class="left">Supports ACID transactions in a single Container.</td></tr>
</tbody>
</table>



</div>
</div>

</div>

<div id="outline-container-1-3" class="outline-3">
<h3 id="sec-1-3"><span class="section-number-3">1.3</span> Description of Terms</h3>
<div class="outline-text-3" id="text-1-3">


<p>
Below are descriptions of terms used to explain GridDB.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Terms</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">Node</td><td class="left">A server process which performs data management in GridDB.</td></tr>
<tr><td class="left">Cluster</td><td class="left">A node or a set of nodes which work together to perform data management.</td></tr>
<tr><td class="left">Partition</td><td class="left">A logical area for storing data, which is only prepared wthin GridDB and cannot be directly seen by users.</td></tr>
<tr><td class="left">Row</td><td class="left">A piece of data managed by GridDB, which is a unit of data consisting of a key and multiple values.</td></tr>
<tr><td class="left">Container</td><td class="left">A receptacle which stores a set of Rows. Two types are available: Collection and TimeSeries.</td></tr>
<tr><td class="left">Collection</td><td class="left">A type of Container storing Rows with general type keys.</td></tr>
<tr><td class="left">TimeSeries</td><td class="left">A type of Container storing Rows with time-type keys, provided with a special function to operate Rows with time-type keys.</td></tr>
<tr><td class="left">Master node</td><td class="left">A node which controls clustering behaviours.</td></tr>
<tr><td class="left">Follower node</td><td class="left">A node other than a master node participating in a cluster.</td></tr>
<tr><td class="left">Owner node</td><td class="left">A node holding a master Container among replicate Containers.</td></tr>
<tr><td class="left">Backup node</td><td class="left">A node holding a replica Container among replicate Containers.</td></tr>
</tbody>
</table>



</div>
</div>

</div>

<div id="outline-container-2" class="outline-2">
<h2 id="sec-2"><a name="chap_system" id="chap_system"></a><span class="section-number-2">2</span> System Design and Configuration</h2>
<div class="outline-text-2" id="text-2">


<p>
This chapter shows a basic flow of system design and configuration.
</p>
<p>
The design and construction of GridDB nodes and clusters is carried out according to the process below.
</p>
<ol>
<li><a href="#calc_resources">Make sure that required resources are available.</a>
</li>
<li><a href="#setup_node">Install and set up GridDB.(Node)</a>
</li>
<li><a href="#setup_params">Configure environment-dependent parameters.</a>
</li>
<li><a href="#tune-up_params">configure tuning parameters.</a>
</li>
<li><a href="#dist_conf">Distribute the definition file to each node</a>
</li>
</ol>


<p>
Refer to the items below for the client settings.
</p>
<ul>
<li><a href="#setup_client">Installing and Setting Up GridDB (Client)</a>
</li>
</ul>




</div>

<div id="outline-container-2-1" class="outline-3">
<h3 id="sec-2-1"><a name="calc_resources" id="calc_resources"></a><span class="section-number-3">2.1</span> Make sure that required resources are available.</h3>
<div class="outline-text-3" id="text-2-1">



<p>
GridDB is a scalable database 
and requiring no deliberate system design and sizing, unlike conventional DBs. However, you should consider the following as a guide of initial system design.
</p>
<ul>
<li>Memory usage
</li>
<li>Number of nodes constituting a cluster
</li>
<li>Disk usage
</li>
</ul>


<p>
The following subsections show how to estimate the these factors.
</p>
<p>
<span style="text-decoration:underline;">The calculation of memory size shown below, however, take no account of the function of enlarging capacity using SSD or other external strage.</span>
</p>


</div>

<div id="outline-container-2-1-1" class="outline-4">
<h4 id="sec-2-1-1"><span class="section-number-4">2.1.1</span> Total Memory Usage</h4>
<div class="outline-text-4" id="text-2-1-1">


<p>
Here is shown how to estimate memory usage based on the predicted amount of data to be stored in Containers.
</p>
<p>
First, predict the amount of data to be stored by your application. Predict the following size and quantity:
</p>
<ul>
<li>Data size of a Row
</li>
<li>Number of Rows to be stored
</li>
</ul>


<p>
Next, estimate the memory usage required to store the predicted amount of data.
</p>
<ul>
<li>Memory usage = Row data size × Number of Rows ÷ 0.75 ＋ 8 × Number of Rows × (Number of indexes ＋ 2) ÷ 0.66 (bytes)
</li>
</ul>


<p>
Make an estimate for all Collections created and used by your application as well. The sum of both amounts is the memory usage for your GridDB cluster.
</p>
<ul>
<li>Total memory usage = Sum of memory usage for all Collections
</li>
</ul>


<p>
The estimated figure should be used only as a guide, because precise memory usage varies depending on the frequency of update.
</p>

</div>

</div>

<div id="outline-container-2-1-2" class="outline-4">
<h4 id="sec-2-1-2"><span class="section-number-4">2.1.2</span> Number of Nodes Constituting a Cluster</h4>
<div class="outline-text-4" id="text-2-1-2">


<p>
Here is shown how to estimate the number of nodes used by GridDB. The estimation below is based on the assumption that one node runs on one machine.
</p>
<p>
First, assume the memory size for one machine.
</p>
<ul>
<li>Memory size per machine
</li>
</ul>


<p>
Next, assume the number of replicas to create. You can set the number of replicas as a parameter in GridDB.
</p>
<ul>
<li>Number of replicas
</li>
</ul>


<p>
The default value of the number of replicas is 2.
</p>
<ul>
<li>Number of nodes = (Total memory usage ÷ Memory size per machine) × Number of replicas
</li>
</ul>


<p>
The estimated figure should be used only as a guide, because larger number of nodes are preferrable in view of load balancing and higher availability.
</p>

</div>

</div>

<div id="outline-container-2-1-3" class="outline-4">
<h4 id="sec-2-1-3"><span class="section-number-4">2.1.3</span> Disk Usage</h4>
<div class="outline-text-4" id="text-2-1-3">


<p>
Here is shown how to estimate the size of files created by GridDB and then the disk space required for a machine running a node. Two kinds of files are created: a checkpoint file and a transaction log file.
</p>
<p>
The memory usage in a single node can be calculated as below:
</p>
<ul>
<li>Memory usage per node = (Total memory usage × Number of replicas) ÷ Number of nodes (bytes)
</li>
</ul>


<p>
Based on the calculation above, estimate the size of a checkpoint file as below:
</p>
<ul>
<li>File size = Memory usage per node × 2 (bytes)
</li>
</ul>



<p>
And, since the size of a transaction log file varies depending on the frequency of update, predict the following:
</p>
<ul>
<li>Row update frequency (per second)
</li>
</ul>


<p>
Then, assume a checkpoint interval. You can set the checkpoint interval as a parameter in GridDB.
</p>
<ul>
<li>Checkpoint interval
</li>
</ul>


<p>
The default value of the checkpoint interval is 1200 seconds (20 minutes).
</p>
<p>
Based on the calculation above, estimate the size of a transaction-log file size as below:
</p>
<ul>
<li>File size = Row data size × Row update frequency × Checkpoint interval (bytes)
</li>
</ul>



<p>
Estimate the disk space for a single node by summing up these calculated figures.
</p>
<ul>
<li>Disk usage per node = Transaction log file size ＋ Checkpoint file size
</li>
</ul>




</div>
</div>

</div>

<div id="outline-container-2-2" class="outline-3">
<h3 id="sec-2-2"><a name="setup_node" id="setup_node"></a><span class="section-number-3">2.2</span> Install and set up GridDB.(Node)</h3>
<div class="outline-text-3" id="text-2-2">


<p>
This section shows how to install GridDB on a single machine. For information about clusterintg, see<a href="#chap_operation">Operations</a>.
</p>

</div>

<div id="outline-container-2-2-1" class="outline-4">
<h4 id="sec-2-2-1"><span class="section-number-4">2.2.1</span> Confirming the Environment</h4>
<div class="outline-text-4" id="text-2-2-1">


<p>
We have confirmed the operation on CentOS 6.7
</p>



<pre class="example">$ lsb_release -id
Distributor ID: CentOS
Description:    CentOS release 6.7 (Final)
</pre>


<p>
<b>[Note]</b>
</p><ul>
<li>Select the following option at the minimum for Package Group Selection while installing OS.
<ul>
<li>Basic Server
</li>
</ul>

</li>
</ul>


</div>

</div>

<div id="outline-container-2-2-2" class="outline-4">
<h4 id="sec-2-2-2"><a name="install" id="install"></a><span class="section-number-4">2.2.2</span> Installing a Node</h4>
<div class="outline-text-4" id="text-2-2-2">



<p>
Download the GridDB source code package build to build the nodes and clusters.
</p>



<pre class="example">$ git clone git://github.com/griddb/griddb.git
$ cd griddb
$ sh bootstrap.sh
$ ./configure
$ make
$ export GS_HOME=$PWD
$ export GS_LOG=$PWD/log
</pre>



<p>
Two environment variables are defined as below.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Environment variable</th><th scope="col" class="left">Value</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">GS_HOME</td><td class="left">Directory where source code file is decompressed</td><td class="left">GridDB home directory</td></tr>
<tr><td class="left">GS_LOG</td><td class="left">$GS_HOME/log</td><td class="left">Event log file output directory</td></tr>
</tbody>
</table>

<b>[Note]</b>
<ul>
<li>These environment variables are referenced by the operational commands shown in the following subsections.
</li>
</ul>


</div>

</div>

<div id="outline-container-2-2-3" class="outline-4">
<h4 id="sec-2-2-3"><span class="section-number-4">2.2.3</span> Confirmation After Installation</h4>
<div class="outline-text-4" id="text-2-2-3">


<p>
#Confirm the directory structure of the installed GridDB node.
#First, check that the GridDB home directory and related directory and files have been created.
</p>

<p>
The file below is created when the installation is completed normally.
</p>


<pre class="example">$GS_HOME/bin/gsserver
</pre>


<p>
<b>Supplementary</b>
</p>
<p>
If you start a GridDB node by taking the steps shown later, the following files are created.
</p>
<p>
[Database file]
</p>


<pre class="example">$GS_HOME                                # GridDB home directory
                   data/                # Directory storing database files
                        gs_log_n_m.log  # File recording transaction logs (n, m: positive number)
                        gs_cp_n_p.dat   # Checkpoint file recording data regularly (n, p: positive number)
</pre>


<p>
[Event log file]
</p>


<pre class="example">$GS_HOME                                       # GridDB home directory
                   log/                        # Directory storing event log files
                       gridstore-%Y%m%d-n.log  # Event log file
                       gs_XXXX.log             # Operating tool log file
</pre>


<p>
You can change the directories to store files by editing the relevant parameters in the node definition file.
</p>

</div>

</div>

<div id="outline-container-2-2-4" class="outline-4">
<h4 id="sec-2-2-4"><a name="setup_admin" id="setup_admin"></a><span class="section-number-4">2.2.4</span> Setting up an administrator user (Mandatory)</h4>
<div class="outline-text-4" id="text-2-2-4">


<p>
An administrator user is used for authentication purposes in nodes and clusters. Administrator user information is stored in the 
<b>User definition file</b>. The default file is as shown below.
</p>
<ul>
<li>$GS_HOME/conf/password
</li>
</ul>


<p>
The following default users exist just after installation.
</p>

<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">User</th><th scope="col" class="left">Password</th></tr>
</thead>
<tbody>
<tr><td class="left">admin</td><td class="left">No settings</td></tr>
</tbody>
</table>


<p>
Administrator user information including the above-mentioned default users can be changed using the user administration command in the operating commands.
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Command</th><th scope="col" class="left">Function</th></tr>
</thead>
<tbody>
<tr><td class="left">gs_adduser</td><td class="left">Add an administrator user</td></tr>
<tr><td class="left">gs_deluser</td><td class="left">Delete an administrator user</td></tr>
<tr><td class="left">gs_passwd</td><td class="left">Change the password of an administrator user</td></tr>
</tbody>
</table>


<p>
Change the password as shown below when using a default user.
The password is encrypted during registration.
</p>
<p>
<b>[Note]</b>
</p><ul>
<li><span style="text-decoration:underline;">Default user password has not been set. Be sure to change the password as the server will not start if the administrator user password is not set.</span>
</li>
</ul>





<pre class="example">$ gs_passwd admin
Password:（Input password）
Retype password:（Input password again）
</pre>


<p>
<span style="text-decoration:underline;">When adding a new administrator user except a default user, the user name has to start with gs#.</span>
</p>
<p>
One or more ASCII alphanumeric characters and the underscore sign “_” can be used after gs#.
</p>
<p>
An example on adding a new administrator user is shown below.
</p>



<pre class="example">$ gs_adduser gs#newuser
Password:（Input password）
Retype password:（Input password again）
</pre>


<p>
<b>[Note]</b>
</p>
<ul>
<li><span style="text-decoration:underline;">A change in the administrator user information using a user administration command becomes valid when a node is restarted.</span>
</li>
<li>User information is used for client authentication, <span style="text-decoration:underline;">so the common user information must be registered in all nodes</span>. Make sure that the common user information is referred to by all nodes, by copying the user definition file.
</li>
</ul>





</div>
</div>

</div>

<div id="outline-container-2-3" class="outline-3">
<h3 id="sec-2-3"><a name="setup_params" id="setup_params"></a><span class="section-number-3">2.3</span> Configure environment-dependent parameters.</h3>
<div class="outline-text-3" id="text-2-3">


<p>
After installation, configure the parameters required to run GridDB.
</p>
<ol>
<li>Configuration of the network environment
</li>
<li>Configuration of the cluster name
</li>
</ol>


<p>
You can configure GridDB by editing the following definition files
</p>
<ul>
<li>Cluster definition file(gs_cluster.json)
</li>
<li>Node definition file(gs_node.json)
</li>
</ul>


<p>
The cluster definition file is a file which defines the parameters commonly used in the entire cluster.
</p>
<p>
The node definition file is a file which defines different parameters for each node.
</p>
<p>
Templates for these definition files are installed as shown below.
</p>




<pre class="example">$GS_HOME                            # GridDB home directory

               conf/                # Directory storing definition files
                    gs_cluster.json # Template for cluster definition file
                    gs_node.json    # Template for node definition file
</pre>




<p>
<b>[Note]</b>
</p>
<ul>
<li>The cluster definition file is a file which defines the parameters commonly used in the entire cluster. Accordingly, all the nodes participating in a cluster must share the same settings. A node with a different setting will fail to participate in the cluster, causing an error, which is shown later.
</li>
</ul>



</div>

<div id="outline-container-2-3-1" class="outline-4">
<h4 id="sec-2-3-1"><a name="setup_networks" id="setup_networks"></a><span class="section-number-4">2.3.1</span> Configuration of the Network Environment (Mandatory)</h4>
<div class="outline-text-4" id="text-2-3-1">


<p>
First, configure the network environment. There are roughly two types of setting parameters as follows:
</p>
<ul>
<li>(1)Address information serving as the interface with a client
</li>
<li>(2)Address information for cluster management
</li>
</ul>



<p>
Although these settings need to be set to match the environment, basically default settings will also work.
</p>
<p>
<span style="text-decoration:underline;">However, an IP address derived in reverse from the host name of the machine needs to be an address that allows it to be connected from the outside  regardless of whether the GridDB cluster has a multiple node configuration or a single node configuration.</span>
</p>
<p>
Normally, this can be set by stating the host name and the corresponding IP address in the /etc/hosts file.
</p>
<p>
<b>Setting /etc/hosts</b>
</p>
<p>
First, check with the following command to see whether the setting has been configured. If the IP address appears, it means that the setting has already been configured.
</p>



<pre class="example">$ hostname -i
192.168.11.10
</pre>


<p>
The setting has not been configured in the following cases.
</p>



<pre class="example">$ hostname -i
hostname: Unknown host
</pre>


<p>
In addition, a loopback address that cannot be connected from the outside may appear.
</p>



<pre class="example">$ hostname -i
127.0.0.1
</pre>


<p>
If the setting has not been configured or if a loopback address appears, 
use the following example as a reference to configure /etc/hosts. The host name and IP address, and the appropriate network interface card (NIC) differ depending on the environment.
</p>
<ol>
<li>Check the host name and IP address.
</li>
</ol>





<pre class="example">$ hostname
GS_HOST
$ ip route | grep eth0 | cut -f 12 -d " " | tr -d "\n"
192.168.11.10
</pre>


<ol>
<li>Add the IP address and corresponding host name checked by the root user to the /etc/hosts file.
</li>
</ol>





<pre class="example">192.168.11.10   GS_HOST
</pre>


<ol>
<li>Check that the settings have been configured correctly.
</li>
</ol>





<pre class="example">$ hostname -i
192.168.11.10
</pre>


<p>
*If the displayed setting remains the same as before, it means that a setting higher in priority is given in the /etc/hosts file. Change the priority order appropriately.
</p>
<p>
Proceed to the next setting after you have confirmed that /etc/hosts has been configured correctly.
</p>

<p>
<b>(1)Address information serving as an interface with the client</b>
</p>
<p>
In the address information serving as an interface with the client, there are settings in the <b>Node definition file</b> and <b>Cluster definition file</b>.
</p>
<p>
<b>Node definition file</b>
</p><table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/transaction/serviceAddress</td><td class="left">string</td><td class="left">Listening address for transactions</td></tr>
<tr><td class="left">/transaction/servicePort</td><td class="left">string</td><td class="left">Listening port for transactions</td></tr>
<tr><td class="left">/system/serviceAddress</td><td class="left">string</td><td class="left">Connection address for operational commands</td></tr>
<tr><td class="left">/system/servicePort</td><td class="left">string</td><td class="left">Connection port for operational commands</td></tr>
</tbody>
</table>


<p>
The listening addresses and ports for transactions are used for a client to request a transaction of a GridDB cluster.
Although this address is used to compose a cluster with a single node, it is not used explicitly when composing a cluster with multiple nodes using the API.
</p>

<p>
The connection address and port of the operational command is also used in specifying the process request destination of the operating command.
</p>
<p>
You do not have to define these listening / connection addresses unless you need to use more than one interface for different purposes.
</p>
<p>
<b>Cluster definition file</b>
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/transaction/notificationAddress</td><td class="left">string</td><td class="left">Interface address between a client and a cluster</td></tr>
<tr><td class="left">/transaction/notificationPort</td><td class="left">string</td><td class="left">Interface port between a client and a cluster</td></tr>
</tbody>
</table>


<p>
A multi-cast address and port are specified in the interface address between a client and cluster.
This is used by a GridDB cluster to send cluster information to its clients and for the clients to send processing requests via the API to the cluster.
See the description of the GridStoreFactory class/method in (<a href="GridDB_API_Reference.html">GridDB_API_Reference.html</a>) for details.
</p>



<p>
<b>(2)Address information for cluster administration and processing</b>
</p>
<p>
In the address information for the cluster to autonomously perform cluster administration and processing, there are settings in the <b>Node definition file</b> and <b>Cluster definition file</b>.
These addresses are used internally by GridDB to exchange the heart beat (live check among clusters) and information among the clusters.
These settings are not necessary so long as the address used is not duplicated with other systems on the same network or when using multiple network interface cards.
</p>
<p>
<b>Node definition file</b>
</p><table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/cluster/serviceAddress</td><td class="left">string</td><td class="left">Listening address for cluster management</td></tr>
<tr><td class="left">/cluster/servicePort</td><td class="left">string</td><td class="left">Listening port for cluster management</td></tr>
</tbody>
</table>


<p>
<b>Cluster definition file</b>
</p><table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/cluster/notificationAddress</td><td class="left">string</td><td class="left">Multicast address for cluster management</td></tr>
<tr><td class="left">/cluster/notificationPort</td><td class="left">string</td><td class="left">Multicast port for cluster management</td></tr>
</tbody>
</table>


<ul>
<li>Although a synchronization process is carried out with a replica when the cluster configuration is changed, a timeout time can be set for the process.
<ul>
<li>/sync/timeoutInterval
</li>
</ul>

</li>
</ul>


<p>
<b>[Note]</b>
</p><ul>
<li>An address or port that is not in use except in GridDB has to be set.
</li>
<li>The same address can be set for the node definition file gs_node.json /transaction/serviceAddress, /system/serviceAddress, and /cluster/serviceAddress
   for operations to be performed.
  If a machine has multiple network interfaces, 
  the bandwidth can be increased by assigning a separate address to each respective interface.
</li>
</ul>




</div>

</div>

<div id="outline-container-2-3-2" class="outline-4">
<h4 id="sec-2-3-2"><a name="setup_clusterName" id="setup_clusterName"></a><span class="section-number-4">2.3.2</span> Setting the cluster name (mandatory)</h4>
<div class="outline-text-4" id="text-2-3-2">


<p>
Set the name of the cluster to be composed by the target nodes in advance. The name set will be checked 
to see if it matches the value specified in the command to compose the cluster. As a result, 
this prevents a different node and cluster from being composed when there is an error in specifying the command.
</p>
<p>
The following settings in the <b>Cluster definition file</b> are specified in the cluster name.
</p>
<p>
<b>Cluster definition file</b>
</p><table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/cluster/clusterName</td><td class="left">string</td><td class="left">Name of cluster to create</td></tr>
</tbody>
</table>


<p>
<b>[Note]</b>
</p><ul>
<li><span style="text-decoration:underline;">Node failed to start with default value ("").</span>
</li>
<li><span style="text-decoration:underline;">A unique name on the sub-network is recommended.</span>
</li>
<li>A cluster name is a string composed of 1 or more ASCII alphanumeric characters and the underscore “_”. However, 
  the first character cannot be a number. The name is also not case-sensitive. In addition, it has to be specified within 64 characters.
</li>
</ul>


</div>
</div>

</div>

<div id="outline-container-2-4" class="outline-3">
<h3 id="sec-2-4"><a name="tune-up_params" id="tune-up_params"></a><span class="section-number-3">2.4</span> configure tuning parameters.</h3>
<div class="outline-text-3" id="text-2-4">


<p>
The main tuning parameters are described here.
These parameters are not mandatory but affect the processing performance of the cluster.
</p>


</div>

<div id="outline-container-2-4-1" class="outline-4">
<h4 id="sec-2-4-1"><span class="section-number-4">2.4.1</span> Configuring Tuning Parameters</h4>
<div class="outline-text-4" id="text-2-4-1">


<p>
GridDB creates a transaction log file and a checkpoint file for persistence. Since writing data to these files would have an impact on update performance, you can change creation behaviors by specifying the parameters below. However, as a disadvantage, there might be a high probability of losing data in the event of a failure.
</p>
<p>
Below are the relevant parameters.
</p>
<p>
<b>Node definition file</b>
</p><table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/dataStore/persistencyMode</td><td class="left">string</td><td class="left">Persistence mode</td></tr>
<tr><td class="left">/dataStore/logWriteMode</td><td class="left">int</td><td class="left">Log write mode</td></tr>
</tbody>
</table>


<p>
The persistence mode specifies whether to write to files at the time of updating data. The log write mode specifies the timing of writing to a transaction log file.
</p>
<p>
The following values are available to the persistence mode.
</p>
<ul>
<li>"NORMAL"
</li>
<li>"KEEP_ALL_LOGS"
</li>
</ul>


<p>
"NORMAL" indicates writing to a transaction log file and a checkpoint file at every update. Transaction log files no longer required due to a particular checkpoint are removed. "KEEP_ALL_LOGS" indicates writing to files at the same timing as in "NORMAL" but leaving all transaction log files. The default value is "NORMAL".
</p>
<p>
[Note]
</p>
<p>
<b>[Note]</b>
</p>

<p>
The following values are available to the log write mode.
</p>
<ul>
<li>0: SYNC
</li>
<li>1 or larger integer: DELAYED_SYNC
</li>
</ul>


<p>
"SYNC" indicates writing to a log file at every commit or abort of an update transaction. "DELAYED_SYNC" indicates writing to a log file with delay every specified seconds, irrespective of update timing. The default value is "1 (DELAYED_SYNC 1 second)."
</p>
</div>

</div>

<div id="outline-container-2-4-2" class="outline-4">
<h4 id="sec-2-4-2"><span class="section-number-4">2.4.2</span> Parameters Related to Performance and Availability</h4>
<div class="outline-text-4" id="text-2-4-2">


<p>
GridDB can improve search performance and availability by storing replicate data in multiple nodes of a cluster. Since replicating data would have impact on update performance, you can change replecation behaviors by specifying the parameters below. However, as a disadvantage, there might be a high probability of losing data in the event of a failure.
</p>
<p>
Below are the relevant parameters.
</p>
<p>
<b>Cluster definition file</b>
</p><table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/transaction/replicationMode</td><td class="left">int</td><td class="left">Replication mode</td></tr>
</tbody>
</table>


<p>
The replication mode indicates the method of replication. This mode must be shared by all nodes in a cluster.
</p>
<ul>
<li>"0": Asynchronous replication
</li>
<li>"1": Semi-synchronous replication
</li>
</ul>


<p>
"Asynchronous replication" performs replication asynchronously with the timing of an update transaction. "Semi-synchronous replication" performs replication synchronously with the timing of an update transaction, but does not wait for completion of replication. The default is "0".
</p>


</div>

</div>

<div id="outline-container-2-4-3" class="outline-4">
<h4 id="sec-2-4-3"><a name="other_params" id="other_params"></a><span class="section-number-4">2.4.3</span> Other Parameters</h4>
<div class="outline-text-4" id="text-2-4-3">


<p>
An explanation of the other parameters is given.
Refer to <a href="#param_list">the list of parameters</a> in the annex for the default value.
</p>
<p>
<b>Node definition file</b>
</p>

<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">/dataStore/dbPath</td><td class="left">string</td><td class="left">Directory storing database files</td></tr>
<tr><td class="left">/dataStore/storeMemoryLimit</td><td class="left">string</td><td class="left">Memory buffer size</td></tr>
<tr><td class="left">/dataStore/concurrency</td><td class="left">int</td><td class="left">Concurrency level</td></tr>
<tr><td class="left">/dataStore/affinityGroupSize</td><td class="left">int</td><td class="left">Number of data affinity groups</td></tr>
</tbody>
<tbody>
<tr><td class="left">/checkpoint/checkpointInterval</td><td class="left">int</td><td class="left">Checkpoint interval (in seconds)</td></tr>
</tbody>
<tbody>
<tr><td class="left">/system/eventLogPath</td><td class="left">string</td><td class="left">Event log file output directory</td></tr>
</tbody>
<tbody>
<tr><td class="left">/transaction/connectionLimit</td><td class="left">int</td><td class="left">Upper limit of connections</td></tr>
</tbody>
<tbody>
<tr><td class="left">/trace/category</td><td class="left">string</td><td class="left">Event log output level</td></tr>
</tbody>
</table>


<ul>
<li>The database file directory is a directory storing transaction log files and checkpoint files which are created to make in-memory data persistent.

</li>
<li>The memory buffer size is a memory size used for data management.
  Specify with a string with the unit attached (example: "2048MB").
</li>
<li>The concurrency level is an upper limit number of concurrent I/Os to secondary storage in GridDB.
</li>
<li>In data affinity, specify the number of groups when collecting related data and managing the layout.
</li>
<li>A value from 1 to 64 can be specified for the number of groups. Note that the larger the number of groups, 
  the lower the memory operating efficiency will be.
</li>
<li>The checkpoint interval is an interval at which checkpoint operations (related to data persistence) are performed internally and periodically.
</li>
<li>The event log output directory is a directory storing messages about events, such as an Exception occurring in a node (event message files).
</li>
<li>Set an upper limit of at least twice the number of expected clients as a guide for the number of connections.
</li>
<li>The event log output level is the output level for each category of the event log.
</li>
</ul>


</div>
</div>

</div>

<div id="outline-container-2-5" class="outline-3">
<h3 id="sec-2-5"><a name="dist_conf" id="dist_conf"></a><span class="section-number-3">2.5</span> Distribute the definition file to each node</h3>
<div class="outline-text-3" id="text-2-5">


<p>
<span style="text-decoration:underline;">Among the definition files, the user definition file and cluster definition file need to have  the same settings in all the nodes composing a GridDB cluster.</span>
</p>
<p>
As a result, when composing a cluster with 2 or more nodes, follow the procedure below to set all the nodes.
(When composing a cluster with a single node, the settings of the node and cluster are completed with the procedure so far. )
</p>
<ol>
<li>Perform <a href="#setup_admin">Set up administrator user</a>, <a href="#setup_params">Set up environment-dependent parameters</a> on either of the machines installed with nodes.
</li>
<li>Copy and overwrite the <b>Cluster definition file</b> and <b>User definition file</b> to the definition file directory of another node.
</li>
<li>Copy the <b>Node definition file</b> as well when configuring settings common to all the nodes.
</li>
<li>Configure settings that differ among the nodes separately. (<a href="#setup_networks">set up network environment</a>, etc.)
</li>
</ol>

<p>A
</p></div>

</div>

<div id="outline-container-2-6" class="outline-3">
<h3 id="sec-2-6"><a name="setup_client" id="setup_client"></a><span class="section-number-3">2.6</span> Installing and Setting Up GridDB (Client)</h3>
<div class="outline-text-3" id="text-2-6">


<p>
This section shows how to install client libraries. 
</p>


</div>

<div id="outline-container-2-6-1" class="outline-4">
<h4 id="sec-2-6-1"><span class="section-number-4">2.6.1</span> Confirming the Environment</h4>
<div class="outline-text-4" id="text-2-6-1">


<p>
We have confirmed the operation on CentOS 6.7
</p>



<pre class="example">$ lsb_release -id
Distributor ID: CentOS
Description:    CentOS release 6.7 (Final)
</pre>


<p>
<b>[Note]</b>
</p><ul>
<li>Select the following option at the minimum for Package Group Selection while installing OS.
<ul>
<li>Software Development WorkStation
</li>
</ul>

</li>
</ul>


<p>
We have confirmed the operation on Oracle Java 7 as a Java development environment.
</p>





<pre class="example">$ java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
</pre>


</div>

</div>

<div id="outline-container-2-6-2" class="outline-4">
<h4 id="sec-2-6-2"><span class="section-number-4">2.6.2</span> Installing a client library</h4>
<div class="outline-text-4" id="text-2-6-2">



<p>
Client library are installed by running 'make' in <a href="#install">Installing a Node</a>.
</p>
</div>

</div>

<div id="outline-container-2-6-3" class="outline-4">
<h4 id="sec-2-6-3"><span class="section-number-4">2.6.3</span> Confirmation After Installation</h4>
<div class="outline-text-4" id="text-2-6-3">


<p>
The file below is created when the installation is completed normally.
</p>


<pre class="example">$GS_HOME/bin/gridstore.jar              # Java libraries
</pre>


</div>

</div>

<div id="outline-container-2-6-4" class="outline-4">
<h4 id="sec-2-6-4"><span class="section-number-4">2.6.4</span> Setting Up Libraries</h4>
<div class="outline-text-4" id="text-2-6-4">


<p>
If you use a Java-based client, add the client library path to CLASSPATH.
</p>




<pre class="example">$ export CLASSPATH=${CLASSPATH}:$GS_HOME/bin/gridstore.jar
</pre>


</div>

</div>

<div id="outline-container-2-6-5" class="outline-4">
<h4 id="sec-2-6-5"><span class="section-number-4">2.6.5</span> Setting Up a Client</h4>
<div class="outline-text-4" id="text-2-6-5">


<p>
There is no definition file for setting up a client.
Specify the connection point and user/password in the client program.
</p>

<p>
For details on the NoSQL specifications, refer to "GridDB API Reference" (<a href="GridDB_API_Reference.html">GridDB_API_Reference.html</a>)
</p>



</div>
</div>
</div>

</div>

<div id="outline-container-3" class="outline-2">
<h2 id="sec-3"><a name="chap_operation" id="chap_operation"></a><span class="section-number-2">3</span> Operations</h2>
<div class="outline-text-2" id="text-3">


<p>
This chapter shows the operational procedures for GridDB.
</p>
<p>
The following cases are covered:
</p>
<ul>
<li>Operations from starting to stopping
</li>
</ul>




<p>
The following commands are available for operations.
</p>
<p>
[Command list]
</p>
<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Command</th><th scope="col" class="left">Function</th></tr>
</thead>
<tbody>
<tr><td class="left">gs_startnode</td><td class="left">Starts a node.</td></tr>
<tr><td class="left">gs_joincluster</td><td class="left">Creates a cluster / joins a node to a cluster.</td></tr>
<tr><td class="left">gs_stopcluster</td><td class="left">Stops a cluster (makes a cluster stop working).</td></tr>
<tr><td class="left">gs_stopnode</td><td class="left">Stops (shuts down) a node.</td></tr>
<tr><td class="left">gs_leavecluster</td><td class="left">Detaches a node from a cluster.</td></tr>
<tr><td class="left">gs_appendcluster</td><td class="left">Expands a cluster.</td></tr>
<tr><td class="left">gs_increasecluster</td><td class="left">Increases the number of nodes in a cluster.</td></tr>
</tbody>
<tbody>
<tr><td class="left">gs_stat</td><td class="left">Obtains internal information of a node.</td></tr>
</tbody>
</table>


<p>
<b>[Points to note when using operating commands]</b>
</p>
<ul>
<li>If the proxy environment variable "http_proxy" is defined, set the addresses of nodes to "no_proxy" to specify that the proxy should not be consulted for those addresses;otherwise, a REST/HTTP communication invoked by an operational command will be wrongly sent to the proxy server and the command will not work.
</li>
<li>In the case of a command that has the option "CONNECTION_SERVER:PORT," you do not have to specify this option unless you have changed the setting of a port number from the default.If you specify the option "CONNECTION_SERVER:PORT," you can execute the command on a computer other than the comuter on which you run a node.
</li>
</ul>


<p>
The following sections show how to use the operational commands.
</p>


</div>

<div id="outline-container-3-1" class="outline-3">
<h3 id="sec-3-1"><span class="section-number-3">3.1</span> Operations from Starting to Stopping</h3>
<div class="outline-text-3" id="text-3-1">



</div>

<div id="outline-container-3-1-1" class="outline-4">
<h4 id="sec-3-1-1"><span class="section-number-4">3.1.1</span> Basic Flow</h4>
<div class="outline-text-4" id="text-3-1-1">


<p>
Below is shown an flow of regular operations from starting to stopping a GridDB cluster, after installing and setting up a GridDB node.
</p>
<ol>
<li>Start each node.
</li>
<li>Configure a cluster.
</li>
<li>Use GridDB services.
</li>
<li>Stop the cluster.
</li>
<li>Stop each node.
</li>
</ol>


<p>
<b>[Usage note]</b>
</p><ul>
<li>The instructions shown below presuppose that the operations administrator is aware of the hostnames (or addresses) of all machines running nodes.
</li>
<li>They also presuppose that the administrator is aware of the number of nodes participating in a cluster.
</li>
<li>User “admin” and password “admin” are used as examples in the user authentication option (-u).
</li>
</ul>


</div>

</div>

<div id="outline-container-3-1-2" class="outline-4">
<h4 id="sec-3-1-2"><span class="section-number-4">3.1.2</span> Starting Each Node</h4>
<div class="outline-text-4" id="text-3-1-2">


<p>
Execute the "gs_startnode" command to start a node on a machine on which to run the node. You need to execute this command for each node.
</p>


<p>
Use the command below to start a node.
</p>
<ul>
<li>gs_startnode
</li>
</ul>


<p>
Use the node definition file, cluster definition file and user definition file settings under the conf director of GridDB home directory file to start the node.
A command execution example is shown below.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_startnode
</pre>


<p>
You need to start a node on each machine constituting a cluster.
</p>
<p>
<b>[Note]</b>
</p><ul>
<li>In cluster configuration, all participant nodes must share the same definitions in their <b>Cluster definition file</b>. Make sure that all nodes have the same definitions in their cluster definition files.
</li>
</ul>

<p>Also, all nodes must share the same definitions in their <b>User definition file</b>.
</p>

</div>

</div>

<div id="outline-container-3-1-3" class="outline-4">
<h4 id="sec-3-1-3"><span class="section-number-4">3.1.3</span> Configuring a Cluster</h4>
<div class="outline-text-4" id="text-3-1-3">


<p>
Join the started node to a cluster to constitute a cluster. This operation is necessary even if you run GridDB on a single node (not on multiple nodes of a cluster).
</p>
<p>
To join a node to a cluster, execute the "gs_joincluster" command as below:
</p>
<ul>
<li>gs_joincluster [-s CONNECTION_SERVER:PORT] -n|–-nodeNum NUM_OF_NODES -c|-–clusterName CLUSTER_NAME -u USERNAME/PASSWORD
</li>
</ul>


<p>
Specify "CLUSTER_NAME" and "NUM_OF_NODES" as options.
</p>
<p>
Specify the number of nodes constituting a GridDB cluster for "NUM_OF_NODES." This value is used as a threshold in various services when starting GridDB for the first time.
</p>
<p>
Below is shown an example of executing the command on a computer on which a node runs. 
Create a cluster with the cluster name “<a href="#setup_clusterName">setup_cluster_name</a>” 
and “1” being the number of nodes constituting the cluster.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_joincluster -c setup_cluster_name -n 1 -u admin/admin
</pre>


<p>
Below is shown an example of executing the command on other than a computer on which a node runs. This example shows the case of joining to a cluster named "example_three_nodes_cluster," initially consisting of "3" nodes, on a computer with the address "192.168.10.11" on which a node runs.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_joincluster -s 192.168.10.11:10040 -c example_three_nodes_cluster -n 3 -u admin/admin
</pre>


<p>
A cluster is composed by correctly specifying and executing the cluster name for each of the 3 machines that make up the cluster.
Cluster service will start when the number of nodes participating in a cluster is equal to the number of nodes constituting the cluster.
Once service is started, you will be able to access the cluster from the application.
</p>
<p>
This command returns control immediately after its request is received. 
Since the connection from the application may fail before the cluster is constituted, 
specify the -w option at the last unit that compose the cluster and wait for the cluster constitution to be completed.
</p>
<p>
An example to compose a cluster with 3 nodes by executing the command the same way to the other 2 machines is shown below.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_joincluster -s 192.168.10.12:10040 -c example_three_nodes_cluster -n 3 -u admin/admin
$ gs_joincluster -s 192.168.10.13:10040 -c example_three_nodes_cluster -n 3 -u admin/admin -w
...
Joined node
</pre>


<p>
<b>[Note]</b>
</p><ul>
<li>Specify 1 for the number of nodes constituting a cluster in a single node configuration.
</li>
<li>If the cluster participation command ends in an error, it means that there is a discrepancy in the cluster definition file of the node.
  Check the cluster definition file again and adopt the same definition.
</li>
<li>The cluster service will not start when the number of nodes participating in a cluster does not reach the number of nodes constituting the cluster.
  When service is not started, check whether the number of nodes is correct.
</li>
</ul>


<p>
Separate the nodes from the cluster 
if a wrong number of nodes constituting a cluster is specified. Execute the following cluster separation command.
</p>
<ul>
<li>gs_leavecluster [-s CONNECTION_SERVER:PORT] -u USERNAME/PASSWORD
</li>
</ul>


<p>
An example of the command execution in a machine in which the nodes to be separated from the cluster have been started is shown below.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_leavecluster -u admin/admin
</pre>


<p>
<b>[Note]</b>
</p><ul>
<li>If this command is used for the purpose of stopping the cluster, there is a possibility that the data may no longer be viewable after the cluster comes into operation again.
</li>
<li>If the cluster is already in operation, use the cluster stop command (gs_stopcluster).
</li>
</ul>


</div>

</div>

<div id="outline-container-3-1-4" class="outline-4">
<h4 id="sec-3-1-4"><span class="section-number-4">3.1.4</span> Using a Service</h4>
<div class="outline-text-4" id="text-3-1-4">


<p>
After configuring a cluster, you can use data storage and search services in GridDB from a client program, using a registered user account.
</p>
<p>
For detail on creation of a client program, see 
</p>
<p>
"GridDB API Reference"(<a href="GridDB_API_Reference.html">GridDB_API_Reference.html</a>).
</p>



</div>

</div>

<div id="outline-container-3-1-5" class="outline-4">
<h4 id="sec-3-1-5"><span class="section-number-4">3.1.5</span> Stopping a Cluster</h4>
<div class="outline-text-4" id="text-3-1-5">


<p>
Stop a GridDB cluster. To stop each node, you need to first stop the GridDB cluster adminstration process, and then stop nodes one by one.
</p>
<p>
First, stop the cluster administration process. To do so, execute the "gs_stopcluster" command.
Execute the following command in one of the nodes participating in the cluster.
</p>
<ul>
<li>gs_stopcluster [-s CONNECTION_SERVER:PORT] -u USERNAME/PASSWORD
</li>
</ul>


<p>
Below is shown an example of executing the command on a computer on which a node of the cluster to be stopped runs.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_stopcluster -u admin/admin
</pre>


<p>
After the command is executed, all the nodes participating in the cluster will stop their data storage and search services.
</p>
<p>
Then, stop (shut down) nodes. To do so, execute the "gs_stopnode" command as below:
</p>
<ul>
<li>gs_stopnode [-w [WAIT_TIME]][-s CONNECTION_SERVER:PORT] [-f|&ndash;force] -u USERNAME/PASSWORD
</li>
</ul>


<p>
Below is shown an example of executing the "gs_stopnode" command on a computer on which a node runs.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_stopnode -w -u admin/admin
</pre>


<p>
After executing the "gs_stopnode" command, it might take a while for checkpoint operations (writing data on the memory to files) before the process actually stops. We recommend that you wait for the command to end by specifying the -w option.
</p>


</div>

</div>

<div id="outline-container-3-1-6" class="outline-4">
<h4 id="sec-3-1-6"><span class="section-number-4">3.1.6</span> Restarting a Stopped Cluster</h4>
<div class="outline-text-4" id="text-3-1-6">


<p>
After shutting down a GridDB cluster, you can restart it by following the same procedure as for normal startup, as follows:
</p>
<ul>
<li><span style="text-decoration:underline;">Confirm beforehand the number of participant nodes at the time of shutdown.</span>
</li>
<li>Start node(s).
</li>
<li>Join node(s) to the cluster specifying the number of nodes at the time of shutdown.
</li>
</ul>


<p>
Below is shown an example of restarting a single-node cluster.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_startnode
...
$ gs_joincluster -c setup_cluster_name -n 1 -u admin/admin
...
</pre>


<ul>
<li>Specify <a href="#setup_clusterName">Setup cluster name</a> for the cluster name in the cluster definition file.
</li>
<li>Specify 1 for the number of nodes constituting a cluster in a single node configuration. For a multiple unit configuration, specify the number of nodes at the shutdown point.
</li>
<li>The number of nodes participating in the cluster is output to the event log file at the shutdown point.
</li>
</ul>


<p>
If you restart a GridDB cluster, it will read database files (transaction log files and checkpoint files) to restore the state at the time of shutdown. 
<span style="text-decoration:underline;">It will start services after nodes in the number specified by "NUM_OF_NODES" participate in the cluster.</span>
</p>

<p>
<b>[Note]</b>
</p><ul>
<li>You must correctly specify the number of nodes at the time of shutdown for "NUM_OF_NODES." If you specify the number less than the value of "NUM_OF_INITIAL_NODES" specified when initially configuring a cluster, the cluster will not start any services. If no service is started, make sure that you specify the correct number of nodes.
</li>
<li>If the wrong “Number of nodes constituting a cluster” is specified, separate the nodes from the cluster with a cluster separation command when the cluster is not in operation and specify the right “Number of nodes constituting a cluster” again before letting the nodes participate in the cluster.
</li>
<li>If the wrong “Number of nodes constituting a cluster” is specified, there is a possibility of starting service in the wrong state when the cluster goes into operation. In this case, carry out the procedure to stop the cluster and then perform the restart procedure.
</li>
<li>If the number of nodes changed after shutdown owing to a machine failure etc. (decreased after shutdown), go through the restarting procedure specifying the number of nodes restartable.Then, data will be reallocated as in the case of a failure occurring in operations.However, if the number of nodes decreases considerably, you might fail to access data.
</li>
<li>You can change the IP addresses and port numbers of machines already participating in the cluster (/xxx/serviceAddress、 and /xxx/servicePort in the node definition file).
</li>
</ul>






</div>
</div>

</div>

<div id="outline-container-3-2" class="outline-3">
<h3 id="sec-3-2"><span class="section-number-3">3.2</span> Obtaining Various Information</h3>
<div class="outline-text-3" id="text-3-2">





</div>

<div id="outline-container-3-2-1" class="outline-4">
<h4 id="sec-3-2-1"><span class="section-number-4">3.2.1</span> Obtaining Cluster Information</h4>
<div class="outline-text-4" id="text-3-2-1">


<p>
Obtain cluster information (cluster configuration information and internal information). To do so, execute the "gs_stat" command as below:
</p>
<ul>
<li>gs_stat [-s CONNECTION_SERVER:PORT] -u USERNAME/PASSWORD
</li>
</ul>


<p>
Below is shown an example of executing the command on a computer on which a node runs.
</p>
<p>
[Example of command execution]
</p>


<pre class="example">$ gs_stat -u admin/admin
{
                ：
                ：
    "cluster": {
        "activeCount": 3,
        "clusterName": "defaultCluster",
        "clusterStatus": "MASTER",
                ：
                ：
}
</pre>


<p>
The cluster status (clusterStatus) indicates as follows:
</p>
<ul>
<li>MASTER : Master
</li>
<li>SUB_MASTER : Master candidate when there is a master failure
</li>
<li>FOLLOWER : Follower
</li>
<li>SUB_FOLLOWER : Follower candidate when there is a master failure
</li>
<li>SUB_CLUSTER : Cluster is not in operation
</li>
</ul>


<p>
The system status (nodeStatus) indicates as follows:
</p>
<ul>
<li>INACTIVE : The node is down.
</li>
<li>ACTIVATING : The node is starting.
</li>
<li>ACTIVE : The node is running.
</li>
<li>DEACTIVATING : The node is stopping.
</li>
<li>ABNORMAL : The node has stopped abnormally.
</li>
<li>NORMAL_SHUTDOWN : The node is stopping normally.
</li>
</ul>


<p>
See <a href="#param_list">Parameter List</a> for the descriptions of the other items.
</p>

</div>
</div>

</div>

<div id="outline-container-3-3" class="outline-3">
<h3 id="sec-3-3"><span class="section-number-3">3.3</span> Adding/detaching nodes in a cluster</h3>
<div class="outline-text-3" id="text-3-3">



</div>

<div id="outline-container-3-3-1" class="outline-4">
<h4 id="sec-3-3-1"><span class="section-number-4">3.3.1</span> Adding a node to a cluster in operation</h4>
<div class="outline-text-4" id="text-3-3-1">


<p>
Additional nodes can be added to a running cluster having a specified number of nodes (the number is specified in the cluster configuration gs_joincluster). 
</p>
<p>
Follow the procedure below to add additional nodes to a running cluster. 
</p>
<ul>
<li>Ensure that the cluster is running. 
</li>
<li>Check the status of the cluster. 
</li>
<li>Start the nodes that you want to add. 
<ul>
<li>Check the cluster definition file of the node you want to add is the same as that of the other nodes of the cluster which you want to add the node to. 
</li>
<li>Execute the node addition command on the "node to be added". 
</li>
</ul>

</li>
<li>Get the cluster information of the nodes to be added with a gs_stat command, and if the cluster status turns to FOLLOWER, the node will be able to join the cluster. 
</li>
</ul>


<p>
To increase the number of nodes, execute the following command. 
</p>
<ul>
<li>gs_appendcluster &ndash;cluster connection server: port [-s connection server: port] -u user name/password 
</li>
</ul>


<p>
Specify the server address and port (for the operating command) of "any one of the nodes constituting the cluster where the node is to be added" in the cluster option. A specific example on appending a new node to a cluster is shown below. 
</p>
<p>
Check the status of the cluster to append the node. 
</p>
<p>
[Command execution example] 
</p>


<pre class="example">$ gs_stat -s 192.168.33.29:10040  -u admin/admin
{
        :
    "cluster":{                          // cluster-related
        "activeCount":5,                   // number of nodes already participating in a cluster
        "clusterName":"function_1",        // cluster name
        "clusterStatus":"MASTER",          // cluster status
        "designatedCount":5,               // number of nodes constituting a cluster (predetermined number of nodes)
        :
        
</pre>

<p>
A cluster can be added if the number of nodes already participating in a cluster (number of nodes currently joined to a cluster) is equal to the number of nodes constituting a cluster. If the number of nodes constituting a cluster &gt; number of nodes already participating in a cluster, use gs_joincluster (join a cluster configuration) to add a node to the cluster. 
</p>
<p>
Execute the following command on the machine to which the node will be added. Specify the server address and port (for operating command) of any of the nodes in the cluster (the node does not have to be a master node). 
</p>
<p>
[Command execution example] 
</p>


<pre class="example">$ gs_startnode -w
$ gs_appendcluster --cluster 192.168.33.29:10040 -u admin/admin
</pre>


<p>
After appending the nodes, the number of nodes constituting a cluster and the number of nodes already participating in a cluster will be changed. 
</p>
<p>
[Command execution example] 
</p>


<pre class="example">$ gs_stat  -u admin/admin
{
           :
    "cluster":{                          // cluster-related
        "activeCount":6,                   // number of nodes already participating in a cluster
        "clusterName":"function_1",        // cluster name
        "clusterStatus":"MASTER",          // cluster status
        "designatedCount":6,               // number of nodes constituting a cluster (predetermined number of nodes)
           :
}
</pre>



<p>
<b>[Points to note]</b>
</p><ul>
<li>Since the number of nodes constituting a cluster is required during cluster restart, make a note of this number using the gs_stat command when cluster expansion is carried out. 
</li>
<li>Non-stop expansion of a GridDB cluster (node increase) will be carried out 1 unit at a time. 
</li>
<li>In the case of large scale expansion, stop and re-configure the cluster instead. 
</li>
</ul>


</div>

</div>

<div id="outline-container-3-3-2" class="outline-4">
<h4 id="sec-3-3-2"><span class="section-number-4">3.3.2</span> Detaching a node from a cluster in operation (shrinking a cluster)</h4>
<div class="outline-text-4" id="text-3-3-2">


<p>
In the case where a single node needs to be removed from a running GridDB cluster, follow the procedure below. 
</p>
<ul>
<li>Check that the cluster is running. 
</li>
<li>Execute the cluster detachment command on the node which needs to be detached. 
</li>
</ul>


<p>
Execute the following cluster detachment command. 
</p>
<ul>
<li>gs_leavecluster [-s connection server: port] [-f] -u user name/password 
</li>
</ul>


<p>
[Command execution example] 
</p>


<pre class="example">$ gs_leavecluster -u admin/admin
</pre>


<p>
<b>[Points to note]</b>
</p><ul>
<li>If there is a possibility of data lost resulted from node detachment, cluster reduction will not be able to be carried out. To force node detachment, use the -f option. 
</li>
<li>Continuous node reduction will be carried out 1 node at a time. 
</li>
<li>A cluster will be terminated if the number of nodes existing in the cluster is less than half of the number of nodes constituting the cluster. When a large scale node reduction is required, stop and re-configure the cluster with the new number of nodes. However, please note that when a large scale reduction is carried out, the possibility of data lost increases. 
</li>
</ul>





</div>
</div>
</div>

</div>

<div id="outline-container-4" class="outline-2">
<h2 id="sec-4"><span class="section-number-2">4</span> Notice</h2>
<div class="outline-text-2" id="text-4">

<p>The following notice are only for community edition.
</p><ul>
<li>Only the very simple user authentication is supported. 
</li>
<li>Only one database called "public" which all the registered users can access is supported. 
</li>
<li>Default building environment repeals the trigger function. Add the following option in build to enable a trigger function.
</li>
</ul>




<pre class="example">$ ./configure --enable-activemq
</pre>


</div>

</div>

<div id="outline-container-5" class="outline-2">
<h2 id="sec-5"><span class="section-number-2">5</span> Annex</h2>
<div class="outline-text-2" id="text-5">






</div>

<div id="outline-container-5-1" class="outline-3">
<h3 id="sec-5-1"><a name="param_list" id="param_list"></a><span class="section-number-3">5.1</span> Parameter List</h3>
<div class="outline-text-3" id="text-5-1">


<p>
The list of parameters in the node definition file and cluster definition file in GridDB are shown below.
</p>

</div>

<div id="outline-container-5-1-1" class="outline-4">
<h4 id="sec-5-1-1"><span class="section-number-4">5.1.1</span> Node definition file(gs_node.json)</h4>
<div class="outline-text-4" id="text-5-1-1">



<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th><th scope="col" class="left">Default</th></tr>
</thead>
<tbody>
<tr><td class="left">/dataStore/dbPath</td><td class="left">string</td><td class="left">Directory storing database files</td><td class="left">"data"</td></tr>
<tr><td class="left">/dataStore/storeMemoryLimit</td><td class="left">string</td><td class="left">Memory buffer size</td><td class="left">"1024MB"</td></tr>
<tr><td class="left">/dataStore/concurrency</td><td class="left">int</td><td class="left">Concurrency level</td><td class="left">4</td></tr>
<tr><td class="left">/dataStore/logWriteMode</td><td class="left">int</td><td class="left">Log write mode</td><td class="left">1</td></tr>
<tr><td class="left">/dataStore/persistencyMode</td><td class="left">string</td><td class="left">Persistence mode</td><td class="left">"NORMAL"</td></tr>
<tr><td class="left">/dataStore/affinityGroupSize</td><td class="left">int</td><td class="left">Number of data affinity groups</td><td class="left">4</td></tr>
</tbody>
<tbody>
<tr><td class="left">/checkpoint/checkpointInterval</td><td class="left">string</td><td class="left">Checkpoint execution interval</td><td class="left">"60s"</td></tr>
<tr><td class="left">/checkpoint/checkpointMemoryLimit</td><td class="left">string</td><td class="left">Checkpoint memory buffer size</td><td class="left">"1024MB"</td></tr>
<tr><td class="left">/checkpoint/useParallelMode</td><td class="left">boolean</td><td class="left">Checkpoint parallel operation (false: invalid, true: valid)</td><td class="left">false</td></tr>
</tbody>
<tbody>
<tr><td class="left">/cluster/serviceAddress</td><td class="left">string</td><td class="left">Listening address for cluster management</td><td class="left">"127.0.0.1"</td></tr>
<tr><td class="left">/cluster/servicePort</td><td class="left">int</td><td class="left">Listening port for cluster management</td><td class="left">10010</td></tr>
</tbody>
<tbody>
<tr><td class="left">/sync/serviceAddress</td><td class="left">string</td><td class="left">Reception address used in data synchronization</td><td class="left">"127.0.0.1"</td></tr>
<tr><td class="left">/sync/servicePort</td><td class="left">int</td><td class="left">Reception port used in data synchronization</td><td class="left">10020</td></tr>
</tbody>
<tbody>
<tr><td class="left">/system/serviceAddress</td><td class="left">string</td><td class="left">Connection address of operational command</td><td class="left">"127.0.0.1"</td></tr>
<tr><td class="left">/system/servicePort</td><td class="left">int</td><td class="left">Connection port of operational command</td><td class="left">10040</td></tr>
<tr><td class="left">/system/eventLogPath</td><td class="left">string</td><td class="left">Event log file output directory</td><td class="left">"log"</td></tr>
</tbody>
<tbody>
<tr><td class="left">/transaction/serviceAddress</td><td class="left">string</td><td class="left">Reception address of transaction process</td><td class="left">"127.0.0.1"</td></tr>
<tr><td class="left">/transaction/servicePort</td><td class="left">int</td><td class="left">Reception port of transaction process</td><td class="left">10001</td></tr>
<tr><td class="left">/transaction/connectionLimit</td><td class="left">int</td><td class="left">Upper limit of connections</td><td class="left">5000</td></tr>
</tbody>
<tbody>
<tr><td class="left">/trace/default</td><td class="left">string</td><td class="left">Event log output level</td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/dataStore</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/collection</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/timeSeries</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/chunkManager</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/objectManager</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_INFO"</td></tr>
<tr><td class="left">/trace/checkpointFile</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/checkpointService</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_INFO"</td></tr>
<tr><td class="left">/trace/logManager</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_WARNING"</td></tr>
<tr><td class="left">/trace/clusterOperation</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_INFO"</td></tr>
<tr><td class="left">/trace/clusterService</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/syncService</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/systemService</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_INFO"</td></tr>
<tr><td class="left">/trace/transactionManager</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/transactionService</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
<tr><td class="left">/trace/transactionTimeout</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_WARNING"</td></tr>
<tr><td class="left">/trace/sessionTimeout</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_WARNING"</td></tr>
<tr><td class="left">/trace/replicationTimeout</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_WARNING"</td></tr>
<tr><td class="left">/trace/recoveryManager</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_INFO"</td></tr>
<tr><td class="left">/trace/eventEngine</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_WARNING"</td></tr>
<tr><td class="left">/trace/triggerService</td><td class="left">string</td><td class="left"></td><td class="left">"LEVEL_ERROR"</td></tr>
</tbody>
</table>




</div>

</div>

<div id="outline-container-5-1-2" class="outline-4">
<h4 id="sec-5-1-2"><span class="section-number-4">5.1.2</span> Cluster definition file(gs_cluster.json)</h4>
<div class="outline-text-4" id="text-5-1-2">


<table  border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup><col class="left" /><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Parameter</th><th scope="col" class="left">Data type</th><th scope="col" class="left">Meaning</th><th scope="col" class="left">Default</th></tr>
</thead>
<tbody>
<tr><td class="left">/dataStore/partitionNum</td><td class="left">int</td><td class="left">Number of partitions</td><td class="left">128</td></tr>
<tr><td class="left">/dataStore/storeBlockSize</td><td class="left">string</td><td class="left">Block size("64KB", "1MB")</td><td class="left">"64KB"</td></tr>
</tbody>
<tbody>
<tr><td class="left">/cluster/clusterName</td><td class="left">string</td><td class="left">Cluster name</td><td class="left">""</td></tr>
<tr><td class="left">/cluster/replicationNum</td><td class="left">int</td><td class="left">Number of replicas</td><td class="left">2</td></tr>
<tr><td class="left">/cluster/notificationAddress</td><td class="left">string</td><td class="left">Multicast address for cluster management</td><td class="left">"239.0.0.1"</td></tr>
<tr><td class="left">/cluster/notificationPort</td><td class="left">int</td><td class="left">Multicast port for cluster management</td><td class="left">20000</td></tr>
<tr><td class="left">/cluster/notificationInterval</td><td class="left">string</td><td class="left">Multi-cast interval for cluster administration</td><td class="left">"5s"</td></tr>
<tr><td class="left">/cluster/heartbeatInterval</td><td class="left">string</td><td class="left">Heart beat interval</td><td class="left">"5s"</td></tr>
<tr><td class="left">/cluster/loadbalanceCheckInterval</td><td class="left">string</td><td class="left">Load balance check interval</td><td class="left">"180s"</td></tr>
</tbody>
<tbody>
<tr><td class="left">/sync/timeoutInterval</td><td class="left">string</td><td class="left">Short-term synchronization timeout time</td><td class="left">"30s"</td></tr>
</tbody>
<tbody>
<tr><td class="left">/transaction/notificationAddress</td><td class="left">string</td><td class="left">Multicast address to clients</td><td class="left">"239.0.0.1"</td></tr>
<tr><td class="left">/transaction/notificationPort</td><td class="left">int</td><td class="left">Multicast port to clients</td><td class="left">31999</td></tr>
<tr><td class="left">/transaction/notificationInterval</td><td class="left">string</td><td class="left">Multi-cast interval to client</td><td class="left">"5s"</td></tr>
<tr><td class="left">/transaction/replicationTimeoutInterval</td><td class="left">string</td><td class="left">Replication/timeout time</td><td class="left">"10s"</td></tr>
<tr><td class="left">/transaction/replicationMode</td><td class="left">int</td><td class="left">Replication method (0: non-synchronous, 1: quasi-synchronous)</td><td class="left">0</td></tr>
</tbody>
</table>





</div>
</div>

</div>

<div id="outline-container-5-2" class="outline-3">
<h3 id="sec-5-2"><span class="section-number-3">5.2</span> Build/execution method</h3>
<div class="outline-text-3" id="text-5-2">


<p>
An example on how to build and execute a program is shown.
</p>


<p>
<b>[Note]</b>
</p><ul>
<li>The user and password in the sample program need to be changed appropriately.
</li>
</ul>




<p>
<b>[For NoSQL DB]</b>
</p>
<p>
For Java
</p>
<ol>
<li>Setting the environmental variables
</li>
<li>Copy the sample program to the gsSample directory
</li>
<li>Build
</li>
<li>Run
</li>
</ol>






<pre class="example">$ export CLASSPATH=${CLASSPATH}:$GS_HOME/bin/gridstore.jar
$ mkdir gsSample
$ cp $GS_HOME/docs/sample/program/Sample1.java gsSample/.
$ javac gsSample/Sample1.java
$ java gsSample/Sample1 239.0.0.1 31999 setup_cluster_name admin your_password
</pre>





</div>
</div>

</div>

<div id="outline-container-6" class="outline-2">
<h2 id="sec-6"><span class="section-number-2">6</span> Trademark</h2>
<div class="outline-text-2" id="text-6">


<ul>
<li>GridDB is a trademark of Toshiba Digital Solutions Corporation.
</li>
<li>Oracle and Java are registered trademarks of Oracle and/or its affiliates.
</li>
<li>Linux is a trademark of Linus Torvalds.
</li>
<li>Other product names are trademarks or registered trademarks of the respective owners.
</li>
</ul>




<p>
                            Copyright (C) 2017 TOSHIBA Digital Solutions Corporation
</p>
</div>
</div>
</div>

<div id="postamble">


</div>
</body>
</html>
